<template>
	<view class="content">
		<view class="wallet flex">
			<view class="left">
				<view class="myMoney">
					我的余额
				</view>
				<view class="money flex">
					<view class="zn">￥</view>
					<view class="moneyInt">{{money}}</view>
				</view>
			</view>
			<view class="withdrawal" @click="withdrawal">
				提现
			</view>
		</view>
		<view class="flex walletWater" @click="walletWater">
			<view>钱包流水</view>
			<view>></view>
		</view>
	</view>
</template>

<script>
	import http from '@/apis/http.js'
	export default {
		data() {
			return {
				money:0.00,
			}
		},
		methods: {
			getUserMoney()
			{
				http.POST('user_vip/userMoney').then(res=>{
					this.money = res.data
				})
			},
			withdrawal(){
				uni.navigateTo({
					url:'/pages/my/withdrawal'
				})
			},
			walletWater(){
				uni.navigateTo({
					url:'/pages/my/withdrawalList'
				})
			}
		},
		created() {
			this.getUserMoney()
		},
		onShow() {
			this.getUserMoney();
		}
	}
</script>

<style>
	.flex{display: flex;}
	.content { padding: 30rpx 20rpx; justify-content: space-between;}
	.wallet{width: 100%; height: 400rpx; background-color: #57bdcc; border-radius: 30rpx 30rpx 90rpx 0;}
	.left {padding:80rpx 0 0 60rpx; }
	.myMoney { font-weight: bold; }
	.money { font-weight: bold; color: #fff; font-size: 70rpx; margin-top: 80rpx; align-items: flex-end;} 
	.zn { font-size: 32rpx;}
	.withdrawal { position: absolute; right: 120rpx; top: 110rpx; padding: 20rpx 50rpx; border-radius: 50rpx; background-color: #f9da70;}
	.walletWater { justify-content: space-between; padding: 20rpx 40rpx; font-weight: bold;}
</style>
